<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
 {{currency1()}}
  {{currency02}}
</div>
<!--导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.min.js"></script>
<script>
var vm=new Vue({
  el: "#app",
  data: {
    message: "hello xpp"
  },
  methods: {
    currency1: function (){
      return Date.now();//返回一个时间戳
    }
  },
  computed: {//其实一个属性 看成缓存
    currency02:function () {
      this.message;
      return Date.now();
    }
  }
});

</script>
</body>
</html>